package dao.impl;

import dao.DeptDao;
import org.apache.ibatis.session.SqlSession;
import pojo.Dept;
import utils.MyBatisUtil;

import java.util.List;

public class DeptDaoImpl implements DeptDao {
    @Override
    public List<Dept> findAll() {
        SqlSession connection = MyBatisUtil.getSession();
        List<Dept> depts = connection.getMapper(DeptDao.class).findAll();
        return depts;
    }
}
